Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Here how to work with this...

With 'No Data Validation' set your effectively turning the action into a cancel action and you can no longer submit data.
When you want to use no data validation and change combo boxes dynamically we go to use the submitted values rather than the values already there in the data as these get disregarded when a cancel action happens. So we might use something like the following...
<xp:this.data>
<xp:dominoDocument var="document1" formName="formSelectCity"></xp:dominoDocument>
</xp:this.data>
<xp:table>
<xp:tr>
<xp:td valign="top" id="docCell1">
<xp:button value="Submit" id="button2">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true">
</xp:eventHandler>
</xp:button>
<xp:button value="Cancel" id="button3">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="true" save="false">
</xp:eventHandler>
</xp:button>
<xp:button value="Edit" id="button4"
rendered="#{javascript:!document1.isEditable()}">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action>
<xp:changeDocumentMode mode="edit"></xp:changeDocumentMode>
</xp:this.action>
</xp:eventHandler>
</xp:button>
<xp:br></xp:br>
<xp:text escape="true" id="computedField1" value="#{javascript:@Unique()}"
style="color:rgb(0,128,0);font-weight:bold"></xp:text>
<xp:br></xp:br>
<xp:label id="label1" value="Subject: "></xp:label>
<xp:inputText id="inputText1" value="#{document1.Subject}"
required="true" style="width:200px">
</xp:inputText>
<xp:table id="refreshtable">
<xp:tr>
<xp:td>
<xp:label value="Select a Country: " id="label2">
</xp:label>
</xp:td>
<xp:td>
<xp:comboBox id="comboBox1" value="#{document1.selectCountry}">
<xp:selectItem itemValue="" itemLabel="Please select">
</xp:selectItem>
<xp:eventHandler event="onchange" submit="true"
refreshMode="partial" refreshId="refreshComboBox" immediate="true">
</xp:eventHandler>
<xp:selectItems>
<xp:this.value><![CDATA[${javascript:@Unique(@DbColumn(@DbName(),"viewList",1))}]]></xp:this.value>
</xp:selectItems>
</xp:comboBox>
</xp:td>
</xp:tr>
<xp:tr id="refreshRow">
<xp:td valign="top">
<xp:label value="Select a City: " id="label3">
</xp:label>
<xp:br></xp:br>
<xp:text escape="true" id="computedField2" value="#{javascript:@Unique()}"
style="color:rgb(0,64,0);font-weight:bold">
</xp:text>
<xp:br></xp:br>
<xp:text escape="true" id="computedField3" style="color:rgb(64,128,128)">
<xp:this.value><![CDATA[#{javascript:document1.getItemValueString("selectCountry")}]]></xp:this.value>
</xp:text>
</xp:td>
<xp:td valign="top">
<xp:comboBox id="refreshComboBox" value="#{document1.selectCity}">
<xp:selectItems>
<xp:this.value><![CDATA[#{javascript:var ctry = document1.getItemValueString("selectCountry");
var lst1 = @DbLookup(@DbName(),"viewList","ctry",2);
//@Explode(lst1,",")
var combo1 = getComponent('comboBox1');
// value submitted from the browser
var value = combo1.getSubmittedValue();

if( null == value ){
// else not yet submitted
value = combo1.getValue();
}

return @DbLookup(@DbName(),"viewList",value,2)


}]]>
</xp:this.value>
</xp:selectItems>
</xp:comboBox>
</xp:td>
</xp:tr>
</xp:table>
</xp:td>
</xp:tr>
</xp:table>

Hope this helps.


Feedback response number PHAN7QWE82 created by ~George Fronusteretsi on 04/08/2009

xPages: Combobox with "Refresh choi... (~Ethan Frofooma... 6.Apr.09)
. . Sounds like you're doing alot of th... (~Joan Zektoomar... 7.Apr.09)
. . . . Still no progress (~Ethan Frofooma... 7.Apr.09)
. . . . . . Could you send me the sample app? (~Joan Zektoomar... 7.Apr.09)
. . Designer bug (PHAN7QWBL8) logged, t... (~Joan Zektoomar... 8.Apr.09)
. . . . It works !! But more info... (~Ethan Frofooma... 8.Apr.09)
. . . . . . Here how to work with this... (~Joan Zektoomar... 8.Apr.09)
. . . . . . . . Thanks a lot. It works :-) (~Ethan Frofooma... 8.Apr.09)
. . . . . . . . . . Found the answer to he last questio... (~Ethan Frofooma... 8.Apr.09)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS